package org.sy.lab.多线程基础._4_执行器._2_Future线程控制._2_处理第一个结果;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

public class MyCallable implements Callable<String> {

	private int time;
	private String name;
	
	public MyCallable(int time, String name) {
		this.time = time;
		this.name = name;
	}
	
	@Override
	public String call() throws Exception {
		TimeUnit.SECONDS.sleep(time);
		return "这是" + name + "返回的结果";
	}
}
